package model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;


/**
 * Klasa predstavlja Air_Transport mesto.
 */
@Entity
@Table(name="city")
@NamedQueries(
	{
		@NamedQuery(name = "all_cities", query = "select c from City c"),
		@NamedQuery(name = "city_by_id", query = "select c from City c where c.id = :id")
	}
)
public class City implements Serializable {

	private static final long serialVersionUID = -428802812846732679L;

	@Id
	@Column(name = "id")
	private String id;

	/**
	 * Naziv grada.
	 */
	private String name;
	
	
	public City() {}
	
	public City(String id, String name) {
		this.id = id;
		this.name = name;
	}
	
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	
	@Override
	public String toString() {
		return name;
	}
	
}
